package sgi.message;

@SuppressWarnings("serial")
public class MessageLogin extends Message {
	
	private String username;
	private String password;
	private Boolean loginSucceeded;
	private String loginFailedMessage;
	private int privilege;
	
	public MessageLogin(String username,String password)
	{
		super("select COUNT(*) from users where username = '"+username+"' AND password =  '"+password+"' AND userOnline = '0'");
		this.username = username;
		this.setPassword(password);
	}

	public String getUsername() {
		return username;
	}


	public Boolean getLoginSucceeded() {
		return loginSucceeded;
	}

	public void setLoginSucceeded(Boolean loginSucceeded) {
		this.loginSucceeded = loginSucceeded;
	}

	public String getLoginFailedMessage() {
		return loginFailedMessage;
	}

	public void setLoginFailedMessage(String loginFailedMessage) {
		this.loginFailedMessage = loginFailedMessage;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public int getPrivilege() {
		return privilege;
	}

	public void setPrivilege(int privilege) {
		this.privilege = privilege;
	}
	
}
